package dbtools.queries;

import dbtools.DBResultSet;
import dbtools.DBTransaction;
import dbtools.structures.DBCond;
import dbtools.structures.DBField;
import dbtools.structures.DBTable;

public class OrderByClause {

	private DBTable[] tables;
	private DBField[] fields;
	private DBCond[] conditions;
	private DBField[] orderByFields;
	private DBTransaction transaction;

	public OrderByClause(DBTransaction transaction, DBTable[] tables, DBField[] fields,
			DBCond[] conditions, DBField[] orderByfields) {
		this.transaction = transaction;
		this.tables = tables;
		this.fields = fields;
		this.conditions = conditions;
		this.orderByFields = orderByfields;
	}
	
	public DBResultSet exec(){
		return transaction.execSelect(tables,fields,conditions,orderByFields);
	}


}
